import { createApp } from 'vue'
import App from './components/AllComp.vue'

const app = createApp(App)

app.directive('direct', {
	beforeMount(el,binding, vnode) {
    console.log(binding)
    var s = JSON.stringify
  
    el.innerHTML =
    '钩子函数beforeMount中各参数的取值：<br />' +
      '<b>value:</b> '      + s(binding.value) + '<br>' +
      '<b>argument:</b>'   + s(binding.arg) + '<br>' +
      '<b>modifiers:</b>'  + s(binding.modifiers) + '<br>' +
      '<b>vnode keys:</b>' + Object.keys(vnode).join(', ')
  }
})
app.mount('#app')
